import React from 'react';
import RouterView from '../../router/index';
import {Iprops} from '../../utils/interface';
import style from './index.module.scss';

const Footer = React.lazy(()=>import('../../components/Footer'));

const Main:React.FC<Iprops> = props =>{
   
    const routes = props.routes.filter(item=>item.component)
    return <div className={style.main}>
        <div className={style.content}>
            <RouterView routes={props.routes} />
        </div>
        <Footer routes={routes} />
    </div>
}

export default Main
